package designPatterns_demo.prototype_pattern.superficial_clone.demo3_registration_type;

public class ConcretePrototype2 implements Prototype {
	private String name;
	
	public Prototype clone() {
		Prototype prototype = new ConcretePrototype1();
		prototype.setName(this.name);
		return prototype;
	}
	
	public String toString(){
        return "Now in Prototype2 , name = " + this.name;
    }

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}
}
